<?php

namespace app\common\enums;

/**
 * 状态枚举
 *
 * Class StatusEnum
 * @package app\common\enum
 */
class StatusEnum
{
    const ENABLED = 1;
    const DISABLED = 0;

    /**
     * @var array
     */
    public static $listExplain = [
        self::ENABLED => '启用',
        self::DISABLED => '禁用',
    ];

    /**
     * @param $status
     * @return mixed|string
     */
    public static function getStatus($status)
    {
        return isset(static::$listExplain[$status]) ? static::$listExplain[$status] : '未知';
    }
}
